package com.example.zhaojianxu.signin.signIn.sign.adapter

import android.support.v7.widget.RecyclerView
import android.view.LayoutInflater
import android.view.ViewGroup
import com.example.zhaojianxu.signin.R
import com.example.zhaojianxu.signin.signIn.sign.model.SignEntity

class SignAdapter constructor(var list: List<SignEntity>): RecyclerView.Adapter<SignVH>(){

    init {

    }

    override fun onCreateViewHolder(p0: ViewGroup, p1: Int): SignVH {
        return SignVH(LayoutInflater.from(p0.context).inflate(R.layout.item_sign,p0,false))
    }

    override fun getItemCount(): Int = list.size

    override fun onBindViewHolder(p0: SignVH, p1: Int) {
        p0.bindData()
    }

    override fun getItemId(position: Int): Long {
        return position.toLong()
    }

}